package com.ruoyi.privacyagreement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.privacyagreement.mapper.PrivacyAgreementMapper;
import com.ruoyi.privacyagreement.domain.PrivacyAgreement;
import com.ruoyi.privacyagreement.service.IPrivacyAgreementService;

/**
 * 【隐私协议】Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class PrivacyAgreementServiceImpl implements IPrivacyAgreementService 
{
    @Autowired
    private PrivacyAgreementMapper privacyAgreementMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public PrivacyAgreement selectPrivacyAgreementById(Long id)
    {
        return privacyAgreementMapper.selectPrivacyAgreementById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param privacyAgreement 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<PrivacyAgreement> selectPrivacyAgreementList(PrivacyAgreement privacyAgreement)
    {
        return privacyAgreementMapper.selectPrivacyAgreementList(privacyAgreement);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param privacyAgreement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertPrivacyAgreement(PrivacyAgreement privacyAgreement)
    {
        privacyAgreement.setCreateTime(DateUtils.getNowDate());
        return privacyAgreementMapper.insertPrivacyAgreement(privacyAgreement);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param privacyAgreement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updatePrivacyAgreement(PrivacyAgreement privacyAgreement)
    {
        privacyAgreement.setUpdateTime(DateUtils.getNowDate());
        return privacyAgreementMapper.updatePrivacyAgreement(privacyAgreement);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deletePrivacyAgreementByIds(Long[] ids)
    {
        return privacyAgreementMapper.deletePrivacyAgreementByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deletePrivacyAgreementById(Long id)
    {
        return privacyAgreementMapper.deletePrivacyAgreementById(id);
    }
}
